import request from "@/utils/http"
import type { LoginParams }from'@/types/Login';
import type { LoginMember } from "@/types/LoginMember";


// 微信功能快捷登录
export const vxLoginApi = (code: string) => {
  return request({
    url:'auth/vx/login',
    method:'POST',
    data:code,
  })
}


// 手机验证码登录
export const loginApi = (data: LoginParams) => {
  return request<LoginMember>({
    url:'auth/login',
    method:'POST',
    data,
  })
}

// 获取验证码
export const sendCodeApi = (phone: string) => {
  return request({
    url:'auth/code',
    method:'POST',
    data:phone,
  })
}